package com.like.network;

import com.like.entity.AppStartReq;
import com.like.entity.CheckMobileKeyReq;
import com.like.entity.CheckMobileKeyResp;
import com.like.entity.GeneralResponse;
import com.like.entity.LoginReq;
import com.like.entity.LoginResp;
import com.like.entity.MobileKeyReq;
import com.like.entity.MobileKeyResp;
import com.like.entity.OpenTokenReq;
import com.like.entity.OpenTokenResp;
import com.like.entity.RegReq;
import com.like.entity.RegResp;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface AuthService {

    @FormUrlEncoded
    @POST("open/appstart/1.cshtml")
    Call<GeneralResponse<String>> appStart(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Appcode") String appCode, @Field("Adderss") String address, @Field("Version") String version);

    @FormUrlEncoded
    @POST("opentoken/opentoken/1.cshtml")
    Call<GeneralResponse<OpenTokenResp>> openToken(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Data") OpenTokenReq openTokenReq);

    @FormUrlEncoded
    @POST("open/applogin/1.cshtml")
    Call<GeneralResponse<LoginResp>> login(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Data") LoginReq loginReq);

    @FormUrlEncoded
    @POST("open/mobilregister/1.cshtml")
    Call<GeneralResponse<RegResp>> reg(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Data") RegReq regReq);

    @FormUrlEncoded
    @POST("open/getmobileKey/1.cshtml")
    Call<GeneralResponse<MobileKeyResp>> getMobileKey(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Data") MobileKeyReq mobileKeyReq);

    @FormUrlEncoded
    @POST("open/checkmobilekey/1.cshtml")
    Call<GeneralResponse<CheckMobileKeyResp>> checkMobileKey(@Field("MsgID") String msgId, @Field("Secret") String secret, @Field("Data") CheckMobileKeyReq checkMobileKeyReq);

}
